import { Component } from "react";
import WithRouter from "../router/withRouter";
class Login extends Component{
    render(){
        return (
            <div>
                <h1>登录页面</h1>
                <button onClick={()=>{
                    localStorage.setItem("token","231231231232");
                  let [search] =  this.props.router.searchParams
                  console.log(search.get("redircturl"))
                //   跳转到原来地址
                  this.props.router.navigate(search.get("redircturl"))
                }}>登录</button>
            </div>
        )
    }
}
export default WithRouter(Login)